@echo off

SET LPG=..\..\!Tools\LPG-TD

SET file=jacrim

SET xml=conf\%file%.xml
SET pddl=example\%file%-auto.pddl
SET solutions=%pddl%_*.sol
SET param=%1 %2 %3 %4 %5 %6

echo.
echo **** Cleaning...

del %pddl%_*.sol > nul
del %pddl%_evaluation.txt > nul

echo.
echo **** Generate PDDL file...

call runclass.bat ms.jacrim.genPddl %xml% %pddl%

echo.
echo **** Launch LPG-td

%LPG%\lpg-td-1.0.exe -o example\ex2-tropos-domain.pddl -f %pddl% -out %pddl% %param%

echo.
echo Evaluate found solution(s)...

SET file_list=

echo set file_list=%%file_list%% %%1 > appendFileList.bat

rem for %%i in (%solutions%) do call eval.bat %%i >> %pddl%_evaluation.txt

for %%i in (%solutions%) do call appendFileList.bat %%i

del appendFileList.bat

call runclass.bat ms.jacrim.viewsolution  %xml% %file_list%